package com.csx.saas.platform.system.service.impl;

import com.baomidou.dynamic.datasource.annotation.DS;
import com.csx.basic.base.service.SuperCacheServiceImpl;
import com.csx.basic.cache.model.CacheKeyBuilder;
import com.csx.saas.common.cache.system.SystemRoleCacheKeyBuilder;
import com.csx.saas.platform.system.dao.SystemRoleMapper;
import com.csx.saas.platform.system.entity.SystemRole;
import com.csx.saas.platform.system.service.SystemRoleService;
import lombok.extern.slf4j.Slf4j;
import org.springframework.aop.framework.AopContext;
import org.springframework.stereotype.Service;

/**
 * <p>
 * 业务实现类
 * 角色
 * </p>
 *
 * @author ChenSongXin
 * @date 2021-02-28
 */
@Slf4j
@Service
@DS("#thread.tenant")
public class SystemRoleServiceImpl extends SuperCacheServiceImpl<SystemRoleMapper, SystemRole> implements SystemRoleService {

    @Override
    protected CacheKeyBuilder cacheKeyBuilder() {
        return new SystemRoleCacheKeyBuilder();
    }

    protected SystemRoleService currentProxy() {
        return ((SystemRoleService) AopContext.currentProxy());
    }
}
